import 'package:pedometer_interface/pedometer_interface.dart';
export 'package:pedometer_interface/pedometer_interface.dart';

/// Plugin for changing screen brightness
class Pedometer {
  /// ScreenBrightness designed as static method collection class
  /// So constructor should not provide to user.
  Pedometer._();

  /// Plugin singleton
  static final Pedometer _instance = Pedometer._();

  /// Returns a singleton instance of [Pedometer].
  ///
  /// [Pedometer] is designed to work as a singleton.
  factory Pedometer() => instance;

  /// Returns a singleton instance of [Pedometer].
  ///
  /// [Pedometer] is designed to work as a singleton.
  static Pedometer get instance => _instance;

  /// Private platform prevent direct access or overriding
  static PedometerPlatform get _platform {
    return PedometerPlatform.instance;
  }

  /// Returns one step at a time.
  /// Events come every time a step is detected.
  static Stream<PedestrianStatus> get pedestrianStatusStream =>  _platform.pedestrianStatusStream;

  /// Returns the steps taken since last system boot.
  /// Events may come with a delay.
  static Stream<StepCount> get stepCountStream => _platform.stepCountStream;

}
